#ifndef _CRT_SHA1_H_
#define _CRT_SHA1_H_

#include <crt_core.hpp>

#ifdef __cplusplus
extern "C" {
#endif

#define POLARSSL_ERR_SHA1_FILE_IO_ERROR -0x0076

typedef struct {
    unsigned long total[2];
    unsigned long state[5];
    unsigned char buffer[64];

    unsigned char ipad[64];
    unsigned char opad[64];
} sha1_context;

void sha1_starts(sha1_context* ctx);
void sha1_update(sha1_context* ctx, const unsigned char* input, size_t ilen);
void sha1_finish(sha1_context* ctx, unsigned char output[20]);

#ifdef __cplusplus
}
#endif

#endif
